//part1:C06:ex6.42.cpp
#include <cstddef>
#include <istream>
#include <iostream>
#include <string>
using namespace std;

string make_plural(size_t ctr,const string &word, const string & ending = "s"){
    return (ctr > 1) ? word + ending : word;
}

int main(void){
    cout << "success is : " << make_plural(1, "success", "es")
         << endl;
    cout << "successes is : " << make_plural(2, "success", "es")
         << endl;
    cout << "failure is : " << make_plural(1, "failure") << endl;
    cout << "failures is : " << make_plural(2, "failure") << endl;

    return 0;
}